Scroll to navigation

PCP-ATOPSAR(1) General Commands Manual PCP-ATOPSAR(1)

NAME

pcp-atopsar - Advanced System Activity Report (pcp-atop related)

SYNOPSIS

pcp atopsar [-flags...] [-r file|date ] [-h host ] [-R cnt ] [-b hh:mm ] [-e hh:mm ]
pcp-atopsar [-flags...] interval [ samples ]

DESCRIPTION

The pcp-atopsar program can be used to report statistics at the system level.

In the first synopsis line (no sampling interval specified), pcp-atopsar extracts data from a raw logfile that has been recorded previously by pmlogger(1) (or via the -w option of the pcp-atop program).
You can specify the name of the logfile with the -r option of the pcp-atopsar program. When a pmlogger daily logfile is used, named $PCP_LOG_DIR/pmlogger/[host]/YYYYMMDD (where YYYYMMDD reflects the date), the required date of the form YYYYMMDD can be specified with the -r option instead of the filename, or the symbolic name 'y' can be used for yesterday's daily logfile (this can be repeated so 'yyyy' indicates the logfile of four days ago). If the -r option is not specified at all, today's daily logfile is used by default.
By default, the hostname of the localhost will be used when resolving pmlogger archives, however an alternative host can be specified using the -h option.
The starting and ending times of the report can be defined using the options -b and -e followed by a time argument of the form hh:mm.

In the second synopsis line, pcp-atopsar reads actual activity counters from the kernel with the specified interval (in seconds) and the specified number of samples (optionally). When pcp-atopsar is activated in this way it immediately sends the output for every requested report to standard output. If only one type of report is requested, the header is printed once and after every interval seconds the statistical counters are shown for that period. If several reports are requested, a header is printed per sample followed by the statistical counters for that period.

When invoked via the pcp(1) command, the PCPIntro(1) options -h/--host, -a/--archive, -O/--origin, -s/--samples, -t/--interval, -Z/--timezone and several other options become indirectly available.

Some generic flags can be specified to influence the behaviour of the pcp-atopsar program:

By default the timestamp at the beginning of a line is suppressed if more lines are shown for one interval. With this flag a timestamp is given for every output-line (easier for post-processing).
By default certain resources as disks and network interfaces are only shown when they were active during the interval. With this flag all resources of a given type are shown, even if they were inactive during the interval.
By default pcp-atopsar only uses colors if output is directed to a terminal (window). These colors might indicate that a critical occupation percentage has been reached (red) or has been almost reached (cyan) for a particular resource. See the man-page of atop for a detailed description of this feature (section COLORS).
With the flag -x the use of colors is suppressed unconditionally.
By default pcp-atopsar only uses colors if output is directed to a terminal (window). These colors might indicate that a critical occupation percentage has been reached (red) or has been almost reached (cyan) for a particular resource. See the man-page of atop for a detailed description of this feature (section COLORS).
With the flag -C colors will always be used, even if output is not directed to a terminal.
Use markers at the end of a line to indicate that a critical occupation percentage has been reached ('*') or has been almost reached ('+') for particular resources. The marker '*' is similar to the color red and the marker '+' to the color cyan. See the man-page of atop for a detailed description of these colors (section COLORS).
Repeat the header line within a report for every N detail lines. The value of N is determined dynamically in case of output to a tty/window (depending on the number of lines); for output to a file or pipe this value is 23.
Summarize cnt samples into one sample. When the logfile contains e.g. samples of 10 minutes, the use of the flag '-R 6' shows a report with one sample for every hour.

Other flags are used to define which reports are required:

Show all possible reports.
Report about CPU utilization (in total and per cpu).
Report about processor-related matters, like load-averages and hardware interrupts.
Report about processes.
Current memory- and swap-occupation.
Report about paging- and swapping-activity, and overcommitment.
Report about utilization of logical volumes.
Report about utilization of multiple devices.
Report about utilization of disks.
Report about NFS mounted filesystems on NFS client.
Report about NFS client activity.
Report about NFS server activity.
Report about the network interfaces.
Report about errors for network-interfaces.
Report about IP version 4 network traffic.
Report about errors for IP version 4 traffic.
General report about ICMP version 4 layer activity.
Per-type report about ICMP version 4 layer activity.
Report about UDP version 4 network traffic.
Report about IP version 6 network traffic.
Report about errors for IP version 6 traffic.
General report about ICMP version 6 layer activity.
Per-type report about ICMP version 6 layer activity.
Report about UDP version 6 network traffic.
Report about TCP network traffic.
Report about errors for TCP-traffic.
Report about top-3 processes consuming most processor capacity. This report is only available when using a log file (not when specifying an interval).
Report about top-3 processes consuming most resident memory. This report is only available when using a log file (not when specifying an interval).
Report about top-3 processes issueing most disk transfers. This report is only available when using a log file (not when specifying an interval).
Report about top-3 processes issueing most IPv4/IPv6 socket transfers. This report is only available when using a log file (not when specifying an interval).

OUTPUT DESCRIPTION

Depending on the requested report, a number of columns with output values are produced. The values are mostly presented as a number of events per second.

The output for the flag -c contains the following columns per cpu:

Percentage of cpu-time consumed in user mode (program text) for all active processes running with a nice value of zero (default) or a negative nice value (which means a higher priority than usual). The cpu consumption in user mode of processes with a nice value larger than zero (lower priority) is indicated in the nice%-column.
Percentage of cpu time consumed in user mode (i.e. program text) for all processes running witn a nice value larger than zero (which means with a lower priority than average).
Percentage of cpu time consumed in system mode (kernel text) for all active processes. A high percentage usually indicates a lot of system calls being issued.
Percentage of cpu time consumed for handling of device interrupts.
Percentage of cpu time consumed for soft interrupt handling.
Percentage of cpu time stolen by other virtual machines running on the same hardware.
Percentage of cpu time used by other virtual machines running on the same hardware (overlaps with usr%/nice%).
Percentage of unused cpu time while at least one of the processes in wait-state awaits completion of disk I/O.
Percentage of unused cpu time because all processes are in a wait-state but not waiting for disk-I/O.

The output for the flag -p contains the following values:

Number of process switches (also called context switches) per second on this cpu. A process switch occurs at the moment that an active thread (i.e. the thread using a cpu) enters a wait state or has used its time slice completely; another thread will then be chosen to use the cpu.
Number of hardware interrupts handled per second on this cpu.
The number of new threads started per second.
Load average reflecting the average number of threads in the runqueue or in non-interruptible wait state (usually waiting for disk or tape I/O) during the last minute.
Load average reflecting the average number of threads in the runqueue or in non-interruptible wait state (usually waiting for disk or tape I/O) during the last 5 minutes.
Load average reflecting the average number of threads in the runqueue or in non-interruptible wait state (usually waiting for disk or tape I/O) during the last 15 minutes.

The output for the flag -P contains information about the processes and threads:

The number of new threads started per second.
Total number of processes present in the system.
Number of zombie processes present in the system.
Total number of threads present in the system in state 'running'.
Total number of threads present in the system in state 'interruptible sleeping'.
Total number of threads present in the system in state 'uninterruptible sleeping'.

The output for the flag -m contains information about the memory- and swap-utilization:

Total usable main memory size.
Available main memory size at this moment (snapshot).
Main memory used at this moment to cache metadata-blocks (snapshot).
Main memory used at this moment to cache data-blocks (snapshot).
Amount of memory in the page cache that still has to be flushed to disk at this moment (snapshot).
Main memory used at this moment for dynamically allocated memory by the kernel (snapshot).
Total swap space size at this moment (snapshot).
Available swap space at this moment (snapshot).

The output for the flag -s contains information about the frequency of swapping:

Number of scanned pages per second due to the fact that free memory drops below a particular threshold.
The number of memory-pages the system read from the swap-device per second.
The number of memory-pages the system wrote to the swap-device per second.
The committed virtual memory space i.e. the reserved virtual space for all allocations of private memory space for processes.
The maximum limit for the committed space, which is by default swap size plus 50% of memory size. The kernel only verifies whether the committed space exceeds the limit if strict overcommit handling is configured (vm.overcommit_memory is 2).

The output for the flags -l (LVM), -f (MD), and -d (hard disk) contains the following columns per active unit:

Name.
Busy-percentage of the unit (i.e. the portion of time that the device was busy handling requests).
Number of read-requests issued per second on this unit.
Average number of Kbytes transferred per read-request for this unit.
Number of write-requests issued per second on this unit.
Average number of Kbytes transferred per write-request for this unit.
Average number of requests outstanding in the queue during the time that the unit is busy.
Average number of milliseconds needed by a request on this unit (seek, latency and data-transfer).

The output for the flag -n contains information about activity on NFS mounted filesystems (client):

Mounted device containing server name and server directory being mounted.
Kilobytes data physically read from the NFS server by processes running on the NFS client.
Kilobytes data physically written to the NFS server by processes running on the NFS client.
When the NFS filesystem was mounted during the interval, the state 'M' is shown.

The output for the flag -j contains information about NFS client activity:

Number of RPC calls per second issued to NFS server(s).
Number of read RPC calls per second issued to NFS server(s).
Number of write RPC calls per second issued to NFS server(s).
Number of retransmitted RPC calls per second.
Number of authorization refreshes per second.

The output for the flag -J contains information about NFS server activity:

Number of RPC calls per second received from NFS client(s).
Number of read RPC calls per second received from NFS client(s).
Number of write RPC calls per second received from NFS client(s).
Number of Megabytes per second returned to read requests by clients.
Number of Megabytes per second passed in write requests by clients.
Number of requests per second handled via TCP.
Number of requests per second handled via UDP.

The output for the flag -i provides information about utilization of network interfaces:

Name of interface.
Busy percentage for this interface. If the linespeed of this interface could not be determined (e.g. for virtual interfaces), a question mark is shown.
Number of packets received from this interface per second.
Number of packets transmitted to this interface per second.
Number of Kbytes received from this interface per second.
Number of Kbytes transmitted via this interface per second.
Effective number of megabits received per second.
Effective number of megabits transmitted per second.
Linespeed as number of megabits per second. If the linespeed could not be determined (e.g. virtual interfaces), value 0 is shown.
The linespeed is followed by the indication 'f' (full duplex) or 'h' (half duplex).

The output for the flag -I provides information about the failures that were detected for network interfaces:

Name of interface.
Number of bad packets received from this interface per second.
Number of times that packet transmission to this interface failed per second.
Number of collisions encountered per second while transmitting packets.
Number of received packets dropped per second due to lack of buffer-space in the local system.
Number of transmitted packets dropped per second due to lack of buffer-space in the local system.
Number of frame alignment-errors encountered per second on received packets.
Number of carrier-errors encountered per second on transmitted packets.

The output for the flag -w provides information about the utilization of the IPv4-layer (formal SNMP-names between brackets):

Number of IP datagrams received from interfaces per second, including those received in error (ipInReceives).
Number of IP datagrams that local higher-layer protocols supplied to IP in requests for transmission per second (ipOutRequests).
Number of received IP datagrams that have been successfully delivered to higher protocol-layers per second (ipInDelivers).
Number of received IP datagrams per second for which this entity was not their final IP destination, as a result of which an attempt was made to forward (ipForwDatagrams).
Number of IP datagrams successfully reassembled per second (ipReasmOKs).
Number of IP datagram fragments generated per second at this entity (ipFragCreates).

The output for the flag -W provides information about the failures that were detected in the IPv4-layer (formal SNMP-names between brackets):

Number of input IP datagrams per second for which no problems were encountered to prevent their continued processing but that were discarded, e.g. for lack of buffer space (ipInDiscards).
Number of input IP datagrams per second discarded due to errors in the IP header (ipInHdrErrors).
Number of input IP datagrams per second discarded because the IP address in the destination field was not valid to be received by this entity (ipInAddrErrors).
Number of inbound packets per second that were discarded because of an unknown or unsupported protocol (ipInUnknownProtos).
Number of timeout-situations per second while other fragments were expected for successful reassembly (ipReasmTimeout).
Number of failures detected per second by the IP reassembly algorithm (ipReasmFails).
Number of output IP datagrams per second for which no problems were encountered to prevent their continued processing but that were discarded, e.g. for lack of buffer space (ipOutDiscards).
Number of IP datagrams per second discarded because no route could be found (ipOutNoRoutes).

The output for the flag -y provides information about the general utilization of the ICMPv4-layer and some information per type of ICMP-message (formal SNMP-names between brackets):

Number of ICMP messages (any type) received per second at this entity (icmpInMsgs).
Number of ICMP messages (any type) transmitted per second from this entity (icmpOutMsgs).
Number of ICMP Echo (request) messages received per second (icmpInEchos).
Number of ICMP Echo-Reply messages received per second (icmpInEchoReps).
Number of ICMP Echo (request) messages transmitted per second (icmpOutEchos).
Number of ICMP Echo-Reply messages transmitted per second (icmpOutEchoReps).

The output for the flag -Y provides information about other types of ICMPv4-messages (formal SNMP-names between brackets):

Number of ICMP messages received per second but determined to have ICMP-specific errors (icmpInErrors).
Number of ICMP Source Quench messages received per second (icmpInSrcQuenchs).
Number of ICMP Redirect messages received per second (icmpInRedirects).
Number of ICMP Destination Unreachable messages received per second (icmpInDestUnreachs).
Number of ICMP Time Exceeded messages received per second (icmpOutTimeExcds).
Number of ICMP messages transmitted per second but determined to have ICMP-specific errors (icmpOutErrors).
Number of ICMP Source Quench messages transmitted per second (icmpOutSrcQuenchs).
Number of ICMP Redirect messages transmitted per second (icmpOutRedirects).
Number of ICMP Destination Unreachable messages transmitted per second (icmpOutDestUnreachs).
Number of ICMP Time Exceeded messages transmitted per second (icmpOutTimeExcds).

The output for the flag -u provides information about the utilization of the UDPv4-layer (formal SNMP-names between brackets):

Number of UDP datagrams per second delivered to UDP users (udpInDatagrams).
Number of UDP datagrams transmitted per second from this entity (udpOutDatagrams).
Number of received UDP datagrams per second that could not be delivered for reasons other than the lack of an application at the destination port (udpInErrors).
Number of received UDP datagrams per second for which there was no application at the destination port (udpNoPorts).

The output for the flag -z provides information about the utilization of the IPv6-layer (formal SNMP-names between brackets):

Number of input IPv6-datagrams received from interfaces per second, including those received in error (ipv6IfStatsInReceives).
Number of IPv6-datagrams per second that local higher-layer protocols supplied to IP in requests for transmission (ipv6IfStatsOutRequests). This counter does not include any forwarded datagrams.
Number of multicast packets per second that have been received by the interface (ipv6IfStatsInMcastPkts).
Number of multicast packets per second that have been transmitted to the interface (ipv6IfStatsOutMcastPkts).
Number of IP datagrams successfully delivered per second to IPv6 user-protocols, including ICMP (ipv6IfStatsInDelivers).
Number of IPv6 datagrams successfully reassembled per second (ipv6IfStatsReasmOKs).
Number of IPv6 datagram fragments generated per second at this entity (ipv6IfStatsOutFragCreates).

The output for the flag -Z provides information about the failures that were detected in the IPv6-layer (formal SNMP-names between brackets):

Number of input IPv6 datagrams per second for which no problems were encountered to prevent their continued processing but that were discarded, e.g. for lack of buffer space (ipv6IfStatsInDiscards).
Number of input datagrams per second discarded due to errors in the IPv6 header (ipv6IfStatsInHdrErrors).
Number of input datagrams per second discarded because the IPv6 address in the destination field was not valid to be received by this entity (ipv6IfStatsInAddrErrors).
Number of locally-addressed datagrams per second that were discarded because of an unknown or unsupported protocol (ipv6IfStatsInUnknownProtos).
Number of timeout-situations per second while other IPv6 fragments were expected for successful reassembly (ipv6ReasmTimeout).
Number of failures detected per second by the IPv6 reassembly-algorithm (ipv6IfStatsReasmFails).
Number of output IPv6 datagrams per second for which no problems were encountered to prevent their continued processing but that were discarded, e.g. for lack of buffer space (ipv6IfStatsOutDiscards).
Number of IPv6 datagrams per second discarded because no route could be found (ipv6IfStatsInNoRoutes).

The output for the flag -k provides information about the general utilization of the ICMPv6-layer and some information per type of ICMP-message (formal SNMP-names between brackets):

Number of ICMPv6 messages (any type) received per second at the interface (ipv6IfIcmpInMsgs).
Number of ICMPv6 messages (any type) transmitted per second from this entity (ipv6IfIcmpOutMsgs).
Number of ICMPv6 messages received per second that had ICMP-specific errors, such as bad ICMP checksums, bad length, etc (ipv6IfIcmpInErrors).
Number of ICMP Neighbor Solicit messages received per second (ipv6IfIcmpInNeighborSolicits).
Number of ICMP Neighbor Advertisement messages received per second (ipv6IfIcmpInNeighborAdvertisements).
Number of ICMP Neighbor Solicit messages transmitted per second (ipv6IfIcmpOutNeighborSolicits).
Number of ICMP Neighbor Advertisement messages transmitted per second (ipv6IfIcmpOutNeighborAdvertisements).

The output for the flag -K provides information about other types of ICMPv6-messages (formal SNMP-names between brackets):

Number of ICMP Echo (request) messages received per second (ipv6IfIcmpInEchos).
Number of ICMP Echo-Reply messages received per second (ipv6IfIcmpInEchoReplies).
Number of ICMP Echo-Reply messages transmitted per second (ipv6IfIcmpOutEchoReplies).
Number of ICMP Destination Unreachable messages received per second (ipv6IfIcmpInDestUnreachs).
Number of ICMP Destination Unreachable messages transmitted per second (ipv6IfIcmpOutDestUnreachs).
Number of ICMP Redirect messages received per second (ipv6IfIcmpInRedirects).
Number of ICMP Redirect messages transmitted per second (ipv6IfIcmpOutRedirect).
Number of ICMP Time Exceeded messages received per second (ipv6IfIcmpInTimeExcds).
Number of ICMP Time Exceeded messages transmitted per second (ipv6IfIcmpOutTimeExcds).

The output for the flag -U provides information about the utilization of the UDPv6-layer (formal SNMP-names between brackets):

Number of UDPv6 datagrams per second delivered to UDP users (udpInDatagrams),
Number of UDPv6 datagrams transmitted per second from this entity (udpOutDatagrams),
Number of received UDPv6 datagrams per second that could not be delivered for reasons other than the lack of an application at the destination port (udpInErrors).
Number of received UDPv6 datagrams per second for which there was no application at the destination port (udpNoPorts).

The output for the flag -t provides information about the utilization of the TCP-layer (formal SNMP-names between brackets):

Number of received segments per second, including those received in error (tcpInSegs).
Number of transmitted segments per second, excluding those containing only retransmitted octets (tcpOutSegs).
Number of active opens per second that have been supported by this entity (tcpActiveOpens).
Number of passive opens per second that have been supported by this entity (tcpPassiveOpens).
Number of connections currently open (snapshot), for which the state is either ESTABLISHED or CLOSE-WAIT (tcpCurrEstab).

The output for the flag -T provides information about the failures that were detected in the TCP-layer (formal SNMP-names between brackets):

Number of received segments per second received in error (tcpInErrs).
Number of retransmitted segments per second (tcpRetransSegs).
Number of failed connection attempts per second that have occurred at this entity (tcpAttemptFails).
Number of resets per second that have occurred at this entity (tcpEstabResets).
Number of transmitted segments per second containing the RST flag (tcpOutRsts).

The output for the flag -O provides information about the top-3 of processes with the highest processor consumption:

Process-id (if zero, the process has exited while the pid could not be determined).
The name of the process.
The percentage of cpu-capacity being consumed. This value can exceed 100% for a multithreaded process running on a multiprocessor machine.

The output for the flag -G provides information about the top-3 of processes with the highest memory consumption:

Process-id (if zero, the process has exited while the pid could not be determined).
The name of the process.
The percentage of resident memory-utilization by this process.

The output for the flag -D provides information about the top-3 of processes that issue the most read and write accesses to disk:

Process-id (if zero, the process has exited while the pid could not be determined).
The name of the process.
The percentage of read and write accesses related to the total number of read and write accesses issued on disk by all processes, so a high percentage does not imply a high disk load on system level.

The output for the flag -N provides information about the top-3 of processes that issue the most socket transfers for IPv4/IPv6:

Process-id (if zero, the process has exited while the pid could not be determined).
The name of the process.
The percentage of socket transfers related to the total number of transfers issued by all processes, so a high percentage does not imply a high network load on system level.

EXAMPLES

To see today's cpu-activity so far (supposed that atop is logging in the background):

  pcp-atopsar

To see the memory occupation for June 5, 2012 between 10:00 and 12:30 (supposed that pmlogger has been logging daily in the background on host acme.com):

  pcp-atopsar -m -r $PCP_LOG_DIR/pmlogger/acme.com/20120605 -b 10:00 -e 12:30

 
or
  pcp-atopsar -m -r 20120605 -b 10:00 -e 12:30

 
or, suppose it is June 8, 2012 at this moment
  pcp-atopsar -m -r yyy -b 10:00 -e 12:30

Write a logfile with atop to record the system behaviour for 30 minutes (30 samples of one minute) and produce all available reports afterwards:

  pcp-atop -w /tmp/atoplog 60 30
  pcp-atopsar -A -r /tmp/atoplog

To watch TCP activity evolve for ten minutes (10 samples with sixty seconds interval):

  pcp-atopsar -t 60 10

To watch the header-lines ('_' as last character) of all reports with only the detail-lines showing critical resource consumption (marker '*' or '+' as last character):

  pcp-atopsar -AM | grep '[_*+]$'

FILES

/etc/atoprc
Configuration file containing system-wide default values (mainly flags). See related man-page.
~/.atoprc
Configuration file containing personal default values (mainly flags). See related man-page.
$PCP_LOG_DIR/pmlogger/HOST/YYYYMMDD
Daily data file, where YYYYMMDD are digits representing the date, and HOST is the hostname of the machine being logged.

SEE ALSO

pcp(1), pcp-atop(1), mkaf(1), pmlogger(1), pmlogger_daily(1), PCPIntro(1) and pcp-atoprc(5).

PCP Performance Co-Pilot